package com.iot.ic.service;

import com.iot.ic.model.Device;

import java.util.List;

/**
 * Created by xiuge on 2017/7/10.
 */
public interface DeviceService {

    Device getDeviceByName(String deviceName);

    List<Device> getDeviceList();
    
    List<Device> getDeviceListByTeamId(int teamId);

    int deleteDevice(int deviceId);

    int addDevice(Device device);
    
    int bindDeviceWithTeam(int deviceId, int teamId);
    
    Device getDeviceById(int deviceId);
    
    /**
     * 设备解除车队绑定
     * @param deviceId
     * @return
     */
    int unBindDeviceWithTeam(int deviceId);
    
    int updateDeviceState(Device device);
    
    
    int updateDeviceStateByDeviceNo(String deviceNo);
    
    
    /**
     * 关闭设备状态
     * @param deviceId
     * @return
     */
    int closeDevice(int deviceId);

}
